#!/bin/bash

function max() {
	    if [ $# -ne 3 ]; then
		            echo "usage: max p1 p2 p3"
			            exit 1
				        fi

					    max=$1

					        if [ $max -lt $2 ]; then
							        max=$2
								    fi

								        if [ $max -lt $3 ]; then
										        max=$3
											    fi

											        echo $max  # 直接输出最大值
											}

											result=$(max 1 2 3)  # 使用命令替换捕获返回值
											echo "The max number of 1 2 3 is: $result"

											exit 0

